package com.college.common.exception;

import com.college.common.constant.ExceptionHandler;

/**
 * 自定义业务异常类
 */
public class BusinessException extends RuntimeException {

    private ExceptionHandler code;

    public ExceptionHandler getCode() {
        return code;
    }

    public void setCode(ExceptionHandler code) {
        this.code = code;
    }

    public BusinessException(ExceptionHandler code) {
        this.code = code;
    }

    public BusinessException(String message, ExceptionHandler code) {
        super(message);
        this.code = code;
    }

}
